"Generate package download script" create empty files (in the case of "generate scrip" only one line: "#!/bin/sh").

Bug #513460 reported by pvs
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Triaged
Low
Unassigned
synaptic (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: synaptic

The files are (at least some times) created under the root account
(i.e. /root/packages or /root/Desktop/packages) instead of the user
who ran Synaptic. They are still empty (0-length) files.

These files should contain information about all installed packages
that can be used to duplicate the system.

Ubuntu 9.10, Synaptic version 0.62.7ubuntu6 (karmic)

Some of that has been reported as bugs in Ububtu 9.04 or earlier
but not the part about creating the files in the root account, I believe.

ProblemType: Bug
Architecture: i386
Date: Wed Jan 27 14:19:23 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/sbin/synaptic
NonfreeKernelModules: nvidia
Package: synaptic 0.62.7ubuntu6
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: synaptic
Uname: Linux 2.6.31-17-generic i686

Related branches

Revision history for this message
pvs (pvs-nmsu) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

Could you please describe the steps to recreate it ?
What are the other report you are referring to ?

Changed in synaptic (Ubuntu):
status: New → Incomplete
Revision history for this message
pvs (pvs-nmsu) wrote : Re: [Bug 513460] Re: "Save markings, " "Save markings as..." and "Generate package download script" create empty files (in the case of "generate scrip" only one line: "#!/bin/sh"). Or, alternatively, do nothing: no new file created with the assigned name.
Download full text (5.8 KiB)

> Could you please describe the steps to recreate it ?
> What are the other report you are referring to ?
>

Start the Synaptic package manager (under user account; enter
password when asked)

File -> Save markings as...

Give file name (e.g. markings): empty file is created (0 bytes)

File -> Generate package download script

Give file name (e.g. download.sh): file is created, contains a
single line: #!/bin/sh

Variation: tried selecting all installed packages first
On Synaptic, select "Installed," highlight the first (click) then
move to the last in the list, shift-click: all installed packages
are now highlighted.

Package -> Mark for reinstallation
After awhile all installed packages are marked

File -> Save markings as...
Still empty file

File -> Generate package download script
Now the script has some entries:

#!/bin/sh
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/d/dpkg/dpkg_1.15.4ubuntu2_i386.deb
wget -c http://us.archive.ubuntu.com/ubuntu/pool/universe/x/xemacs21/xemacs21-support_21.4.22-2ubuntu1_all.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/b/base-files/base-files_5.0.0ubuntu7_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/b/bash/bash_4.0-5ubuntu2_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/c/coreutils/coreutils_7.4-2ubuntu1_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/d/dash/dash_0.5.5.1-2ubuntu3_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/d/debianutils/debianutils_2.30ubuntu3_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/d/diffutils/diff_2.8.1-13_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/e/e2fsprogs/e2fsprogs_1.41.9-1ubuntu3_i386.deb
wget -c http://us.archive.ubuntu.com/ubuntu/pool/universe/t/texmacs/texmacs_1.0.7.2-1_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/f/findutils/findutils_4.4.2-1_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/g/grep/grep_2.5.4-4_i386.deb
wget -c http://us.archive.ubuntu.com/ubuntu/pool/main/g/gzip/gzip_1.3.12-8ubuntu1.1_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/i/insserv/insserv_1.12.0-11_i386.deb
wget -c http://us.archive.ubuntu.com/ubuntu/pool/main/s/sysvinit/sysv-rc_2.87dsf-4ubuntu12_all.deb
wget -c http://us.archive.ubuntu.com/ubuntu/pool/main/s/sysvinit/initscripts_2.87dsf-4ubuntu12_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/h/hostname/hostname_2.95ubuntu1_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/s/shadow/login_4.1.4.1-1ubuntu2_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/u/util-linux/mount_2.16-1ubuntu5_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091027)]/pool/main/n/ncurses/ncurses-bin_5.7+20090803-2ubuntu2_i386.deb
wget -c cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386...

Read more...

Revision history for this message
sirald66 (sirald66) wrote : Re: "Save markings," "Save markings as..." and "Generate package download script" create empty files (in the case of "generate scrip" only one line: "#!/bin/sh"). Or, alternatively, do nothing: no new file created with the assigned name.

FYI - I filed two bugs about this exact thing November 1, 2009, but there was no response. I was using Ubuntu 9.04 then and use 9.10 now, which has the same problem.

Bug #469599
Bug #469612

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for following up. Setting status to confirmed

Changed in synaptic (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
sirald66 (sirald66) wrote :

STILL A PROBLEM

Although 'Save Markings As' has started to work, 'Generate Package Download Script' still only has the bash shell starter and no more. (10 byte file)

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I just tried that and it appears to work for me.

Maybe its unclear what the feature is supposed to do? Here is a quick overview:
- save markings will save the current *changes* of the cache to a file. So if you mark 2vcard for install that will be saved and can later be reloaded. The format is compatible with dpkg --set-selections and dpkg --get-selections.
- if you save "full state" it will also save for installed packages (useful to duplicate a machine package setup)

- generate download script will generate a download script for the *changes* in the cache only

If its still a bug, please add instructions how to reproduce and I'm happy to have a look. Suggestions for better names/help
are also welcome.

Revision history for this message
pvs (pvs-nmsu) wrote : Re: [Bug 513460] Re: "Save markings, " "Save markings as..." and "Generate package download script" create empty files (in the case of "generate scrip" only one line: "#!/bin/sh"). Or, alternatively, do nothing: no new file created with the assigned name.

Thank you for looking into that.

>
> Maybe its unclear what the feature is supposed to do? Here is a quick
> overview:

It is quite likely that I misunderstood what it was supposed to be
doing.

> - save markings will save the current *changes* of the cache to a file.
> So if you mark 2vcard for install that will be saved and can later be
> reloaded. The format is compatible with dpkg --set-selections and
> dpkg --get-selections.

I thought it would created a list of all installed packages, just like
what I can get with dpkg --get-selections.

> - if you save "full state" it will also save for installed packages
> (useful to duplicate a machine package setup)
>

This is the functionality I was looking for. I still can't find this
option. How do I save "full state"?

> - generate download script will generate a download script for the
> *changes* in the cache only
>
> If its still a bug, please add instructions how to reproduce and I'm
> happy to have a look. Suggestions for better names/help
> are also welcome.
>

Given your explanation, no, I don't think it is a bug. It does what
you say. Perhaps a better name would be "Save current markings" or
something like that.

Thanks again,
                                                          Vassili

> --
> "Save markings," "Save markings as..." and "Generate package download script" create empty files (in the case of "generate scrip" only one line: "#!/bin/sh"). Or, alternatively, do nothing: no new file created with the assigned name.
> https://bugs.launchpad.net/bugs/513460
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in ���synaptic��� package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: synaptic
>
> The files are (at least some times) created under the root account
> (i.e. /root/packages or /root/Desktop/packages) instead of the user
> who ran Synaptic. They are still empty (0-length) files.
>
> These files should contain information about all installed packages
> that can be used to duplicate the system.
>
> Ubuntu 9.10, Synaptic version 0.62.7ubuntu6 (karmic)
>
> Some of that has been reported as bugs in Ububtu 9.04 or earlier
> but not the part about creating the files in the root account, I believe.
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Jan 27 14:19:23 2010
> DistroRelease: Ubuntu 9.10
> ExecutablePath: /usr/sbin/synaptic
> NonfreeKernelModules: nvidia
> Package: synaptic 0.62.7ubuntu6
> ProcEnviron:
> PATH=(custom, no user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
> SourcePackage: synaptic
> Uname: Linux 2.6.31-17-generic i686
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/synaptic/+bug/513460/+subscribe

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: "Save markings," "Save markings as..." and "Generate package download script" create empty files (in the case of "generate scrip" only one line: "#!/bin/sh"). Or, alternatively, do nothing: no new file created with the assigned name.

I'm setting to triaged anyway because the "generate script" generates lines with only "wget -c" and need to be fixed.
To reproduce:
- Filter by status / installed
- select _all_ packages
- right click and mark for reinstallation
- file / generate download script

result: the file is filed with lines containing only "wget -c" .
It's behaving correctly when you select only a few packages.

@pvs: to answer your question, to "save full state" go to "File -> Save Markings As ..." there is a check box labeled "save full state, no only changes" at the bottom of the dialog .
You'll probably be interested in bug 33065 to propose improvements to make this feature more visible.

Changed in synaptic (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This occurs when a non authenticated (e.g obsolote) package is selected.
The apt's method DescURI() returns an empty string for the package listed after the unauthenticated one.
I'm adding an apt task

Changed in apt (Ubuntu):
status: New → Triaged
importance: Undecided → Low
summary: - "Save markings," "Save markings as..." and "Generate package download
- script" create empty files (in the case of "generate scrip" only one
- line: "#!/bin/sh"). Or, alternatively, do nothing: no new file created
- with the assigned name.
+ "Generate package download script" create empty files (in the case of
+ "generate scrip" only one line: "#!/bin/sh").
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

By selecting a package list, a user could apply an action not allowed for a particular package e.g mark for reinstallation an uninstallable package. That's what broke the "generate download script" functionality.
I pushed a fix in synaptic to check the package flag when a user applies an action to a list of packages.
That should fixes the synaptic issue.

However the behavior of synaptic/apt returning an empty string in DescURI needs some investigation.

Changed in synaptic (Ubuntu):
assignee: nobody → Jean-Baptiste Lallement (jibel)
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package synaptic - 0.63.1ubuntu4

---------------
synaptic (0.63.1ubuntu4) lucid; urgency=low

  [ Michael Vogt ]
  * po/it.po:
    - updated, thanks to Milo Casagrande (closes: #575685)

  [ Jean-Baptiste Lallement ]
  * common/rpackage.{cc,h}:
    - Use simplified URI for third party changelogs (LP: #45129)
  * debian/patches/01_ubuntu_changelog.dpatch:
    - update patch to support third party changelogs
  * common/rpackage.{cc,h}:
    - Support third party changelogs by using ArchiveURI() (LP: #153966)
    - Display LP links when changelog is not available for download
      (LP: #452564)
  * gtk/rgmainwindow.cc:
    - check package flags when applying an action to a package list
      (LP: #513460)
  * common/rpackagelister.cc
    - workaround to allow searching for terms with an hyphen (LP: #282995)
  * common/rpackagelister.cc:
    - xapianSearch: do not expand the first term when replacing the hyphen
    to reduce size of the resultse

  [ Oliver Joos ]
  * common/rconfiguration.cc:
    - Fix to store setting "Consider recommended packages as dependencies"
      (closes debian #440027 and LP: #154349)
 -- Michael Vogt <email address hidden> Thu, 15 Apr 2010 01:59:51 +0200

Changed in synaptic (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
alejandro (nosferatu2011) wrote :

gestor de paquetes y repositorio main tiene un error en la version en español nose si es bug o una falla del servidor de tal repositorio poque sus lecturas no extrañas no acepta bajar paquetes deb del Synaptic

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

hola alejandro,

You very likely experiencing bug 545336 which seems to affect only spanish users.

Revision history for this message
Julian Andres Klode (juliank) wrote :

I fail to see an APT bug here, closing

Changed in apt (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

@andreas please read comment 10. I worked around in synaptic but there is a problem with apt in some situation.

Changed in apt (Ubuntu):
status: Invalid → Triaged
Changed in synaptic (Ubuntu):
assignee: Jean-Baptiste Lallement (jibel) → nobody
Revision history for this message
Enkouyami (furyhamster) wrote :

On Precise 12.04, synaptic's 0.75.7 option "Generate package download script" STILL creates only one line to the saved file: "#!/bin/sh"
I tried it that option on a fresh Ubuntu 12.04 daily installed system from yesterday. This has not been resolved.

Revision history for this message
rbaleksandar (redbaronqueen) wrote :

I might be going too far but I do believe this bug affects all Debian- or Ubuntu-based distros that work with Synaptics. I have Ubuntu 12.04 LTS installed on my machine along with Win7 where I have Lubuntu (forgot which version but let's assume it's the latest one) and Debian 6 (latest stable and up-to-date) running as VMs in VirtualBox. This problem is present like forever. I actually can't remember if it worked at all at some point in the past. This feature is very practical and I know you can do this via the terminal but it'll be nice to open just one window and manage all the packages and package-relevant activities there instead of switching from one window to another.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.