[Bug 1509702] Re: add-apt-repository adds same repository multiple times
Thank you for your bug report, so the issue is not that it adds it several time but that it adds it when you use the command even if the source is already active? Is that correct? (your title suggests it does it by itself if you use it correct, which you description seems to suggest is not the case) ** Changed in: software-properties (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1509702 Title: add-apt-repository adds same repository multiple times To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1509702/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1509702] Re: add-apt-repository adds same repository multiple times
Re-hi, I made a small fix to the aptsources module (locally on my laptop). Aptsources comes from the python-apt package. $ apt-get source python-apt $ cd python-apt-1.0.1build1/ $ cd aptsources/ # Edit sourceslist.py file. # Add a make_unique(self, l) function to the SourcesList class. # Then call make_unique from the refresh() function. # This will remove duplicate lines while maintaining sort order of the list. Please see: http://paste.ubuntu.com/12973347/ On Mon, Oct 26, 2015 at 3:43 PM, momawrote: > BTW: > The --remove option empties both the repository file and its backup copy. > But the empty files remains in /etc/apt/sources.list.d/ folder. Is this > correct? > > # Our repository files. > $ ls -l /etc/apt/sources.list.d/ > -rw-r--r-- 1 root root 207 Out 26 15:41 audio-recorder-ubuntu-ppa-wily.list > -rw-r--r-- 1 root root 136 Out 26 15:41 > audio-recorder-ubuntu-ppa-wily.list.save > --- > > # Remove a repository. The empty files remain in the system. > $ sudo add-apt-repository --remove ppa:audio-recorder/ppa > > $ ls -l /etc/apt/sources.list.d/ > -rw-r--r-- 1 root root 0 Out 26 15:41 audio-recorder-ubuntu-ppa-wily.list > -rw-r--r-- 1 root root 0 Out 26 15:41 > audio-recorder-ubuntu-ppa-wily.list.save > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/1509702 > > Title: > add-apt-repository adds same repository multiple times > > Status in software-properties package in Ubuntu: > New > > Bug description: > Hello, > I am running Ubuntu 15.10 and noticed that add-apt-repository adds the > same source-repository multiple times. > I have accidentally run the add-apt command several times. > > $ sudo add-apt-repository ppa:audio-recorder/ppa > > A screenshot. > [url= > http://bildr.no/view/ZktOZDRI][img]http://bildr.no/thumb/ZktOZDRI.jpeg[/img][/url > ] > > I have one `audio-recorder-ubuntu-ppa-wily.list` file in /the > etc/apt/sources.list.d/ folder: > > $ cat /etc/apt/sources.list.d/audio-recorder-ubuntu-ppa-wily.list > > deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main > # deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main > # deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main > # deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main > - > > $ lsb_release -a > No LSB modules are available. > Distributor ID: Ubuntu > Description: Ubuntu 15.10 > Release: 15.10 Codename: wily > > ProblemType: Bug > DistroRelease: Ubuntu 15.10 > Package: software-properties-gtk 0.96.13 > ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3 > Uname: Linux 4.2.0-16-generic x86_64 > ApportVersion: 2.19.1-0ubuntu3 > Architecture: amd64 > CurrentDesktop: Unity > Date: Sat Oct 24 19:43:44 2015 > InstallationDate: Installed on 2015-10-19 (4 days ago) > InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20151017) > PackageArchitecture: all > SourcePackage: software-properties > UpgradeStatus: No upgrade log present (probably fresh install) > > To manage notifications about this bug go to: > > https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1509702/+subscriptions > -- Sent from my PC, laptop or phone with Ubuntu-Linux. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1509702 Title: add-apt-repository adds same repository multiple times To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1509702/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1509702] Re: add-apt-repository adds same repository multiple times
BTW: The --remove option empties both the repository file and its backup copy. But the empty files remains in /etc/apt/sources.list.d/ folder. Is this correct? # Our repository files. $ ls -l /etc/apt/sources.list.d/ -rw-r--r-- 1 root root 207 Out 26 15:41 audio-recorder-ubuntu-ppa-wily.list -rw-r--r-- 1 root root 136 Out 26 15:41 audio-recorder-ubuntu-ppa-wily.list.save --- # Remove a repository. The empty files remain in the system. $ sudo add-apt-repository --remove ppa:audio-recorder/ppa $ ls -l /etc/apt/sources.list.d/ -rw-r--r-- 1 root root 0 Out 26 15:41 audio-recorder-ubuntu-ppa-wily.list -rw-r--r-- 1 root root 0 Out 26 15:41 audio-recorder-ubuntu-ppa-wily.list.save -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1509702 Title: add-apt-repository adds same repository multiple times To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1509702/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1509702] Re: add-apt-repository adds same repository multiple times
The add-apt-repository command adds always a new "deb-src" line no matter if the source is enabled or disabled. Example: $ cat /etc/apt/sources.list.d/audio-recorder-ubuntu-ppa-wily.list deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main -- $ sudo add-apt-repository ppa:audio-recorder/ppa $ cat /etc/apt/sources.list.d/audio-recorder-ubuntu-ppa-wily.list deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main # deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main -- $ sudo add-apt-repository ppa:audio-recorder/ppa $ cat /etc/apt/sources.list.d/audio-recorder-ubuntu-ppa-wily.list deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main # deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main # deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main deb-src http://ppa.launchpad.net/audio-recorder/ppa/ubuntu wily main -- It seems like the "deb" lines are treated correctly while "deb-src" lines are duplicated. The [Remove]-button in the GUI (software-properties-gtk) works fine. It removes all extra lines. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1509702 Title: add-apt-repository adds same repository multiple times To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1509702/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1509702] Re: add-apt-repository adds same repository multiple times
Screenshot: http://bildr.no/view/ZktOZDRI -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1509702 Title: add-apt-repository adds same repository multiple times To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1509702/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs