Source code apt-get source

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Drygar

Source code apt-get source

Post by Drygar »

Hi,

I wanted to get some source code of applications to compare them but seems that apt-get source command doesn't work.

Can you help me with this?

xxx ~ $ apt-get source firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list

How do I get the firefox package and thunderbird packages - their source codes.
I found this page but it is Ubuntu's versions, I wanted to compare the FF Ubuntu version and FF Mint version.

Thank you!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Source code apt-get source

Post by Laurent85 »

See Software Sources -> Enable source code repositories -> Update the cache
Image
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Source code apt-get source

Post by JeremyB »

I really doubt there is a FF version for Linux Mint, you could check Synaptic Package Manager, search for firefox and see what the installed and latest versions are. The settings in Linux Mint Update manager may not allow the latest Firefox to be a Level 1-3 update at this time
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Source code apt-get source

Post by Cosmo. »

Firefox for LM 17.x is now made by the Mint Devs and back to level 3. See here.
Drygar

Re: Source code apt-get source

Post by Drygar »

Laurent85 wrote:See Software Sources -> Enable source code repositories -> Update the cache

Hi Laurent85,

Thank you!

I did this. Source code repositories are enabled now and cache is also updated. Unfortunately, I see get this error "E: You must put some 'source' URIs in your sources.list"
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Source code apt-get source

Post by Laurent85 »

Check:

Code: Select all

cat /etc/apt/sources.list.d/official-source-repositories.list
deb-src http://packages.linuxmint.com rafaela main upstream import 

deb-src http://extra.linuxmint.com rafaela main

deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse

deb-src http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://archive.canonical.com/ubuntu/ trusty partner

Code: Select all

apt source firefox
Reading package lists... Done
Building dependency tree       
Reading state information... Done
NOTICE: 'firefox' packaging is maintained in the 'Bzr' version control system at:
https://code.launchpad.net/~mozillateam/firefox/firefox.trusty
Please use:
bzr branch https://code.launchpad.net/~mozillateam/firefox/firefox.trusty
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 252 MB of source archives.
Get:1 http://packages.linuxmint.com/ rafaela/upstream firefox 41.0+linuxmint2+rafaela (dsc) [6361 B]
Get:2 http://packages.linuxmint.com/ rafaela/upstream firefox 41.0+linuxmint2+rafaela (tar) [252 MB]
...                                    
dpkg-source: warning: extracting unsigned source package (firefox_41.0+linuxmint2+rafaela.dsc)
dpkg-source: info: extracting firefox in firefox-41.0+linuxmint2+rafaela
dpkg-source: info: unpacking firefox_41.0+linuxmint2+rafaela.tar.gz
Image
Drygar

Re: Source code apt-get source

Post by Drygar »

Hi,

Thank you for your help!

I checked my official-source-repositories.list file as you write - it looks the same.
sources.png

I tried with apt source firefox and still the same error

apt source firefox

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
I opened the sources.list file in /etc/apt and it looks like this

Code: Select all

#deb cdrom:[Linux Mint 17.2 _Rafaela_ - Release amd64 20150627]/ trusty contrib main non-free
Drygar

Re: Source code apt-get source

Post by Drygar »

Hello all!

I still experience the same issue.

Althought I managed to download the source of Firefox via web browser from http://packages.linuxmint.com, I still cannot make it via the terminal.
I came accross this article in stackexchange and I am wondering if my sources.list file in /etc/apt should be empty as shown above.

Doesn't anybody experiences this issue ? I am using LM 17.2 Mate and I have never before touched anything in the repositorie and I was thinking this should work by default unless I do anything wrong. Any advice is much welcome . :)

Code: Select all

apt-get source firefox
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
Drygar

Re: Source code apt-get source

Post by Drygar »

Well, its freedom to post or not to post, to reply and not to reply but this situation totally busted the myth (for me) about famous Linux community where everybody jumps to help. Anyway, freedom... my 2 cents

I decided to post and to notify the community how I kind of fixed this issue I experiences. Maybe someone else might experience such an issue in future. Hope this helps.

So, I decided to repeat the procedure even though my sourceslist files were ok.
firefoxsource2.png
I opened Software sources. Chose the option to restore to default option.
Saved and reloaded packages.
Opened Software sources again. Reclicked packages.linuxmint.com and archive.ubuntu.com, checked the option to enable Sources. Saved and reloaded packages.
softsources.png
Then, apt-get sources firefox works. What still remains a mystery to me is that source pakcs got downloaded from ubuntu repos, not from packages.linuxmint.com but I will survive. :)
firefoxsource1.png
Thank you
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Source code apt-get source

Post by Laurent85 »

You got most recent version regardless of pin priority. Use "apt policy firefox" command to list available versions for download. To download Linux Mint version sources:

Code: Select all

apt source firefox=41.0+linuxmint2+rafaela
Image
Locked

Return to “Software & Applications”