On Sun, 2016-06-05 at 00:49 +0200, Guillem Jover wrote:
> On Sat, 2016-06-04 at 17:43:41 +0100, Adam D. Barratt wrote:
> > Control: reassign -1 dpkg-dev 1.17.27
> > Control: affects -1 devscripts
> > Control: retitle -1 dpkg-source -x overwrites existing directories
> > 
> > On Sat, 2016-06-04 at 18:08 +0200, ydir...@free.fr wrote:
> > > dget unpacks the downloaded source by default, even if the target 
> > > directory was
> > > pre-existing.  Moreover, it does not just unpack it above the 
> > > pre-existing dir,
> > > but removes it first, together with all the other files it may contain !
> > 
> > Nope. dget simply calls "dpkg-source -x". The effect is trivially
> > reproducible by calling "dpkg-source -x somepackage.dsc
> > an-existing-directory" without needing to involve dget at all.
> 
> Hmm, I'm afraid I cannot reproduce this on stable nor unstable. I've
> tried with devscripts, fbset, dpkg-repack and dgit, to try different
> source formats:
> 
>   $ dpkg-source -x devscripts_2.16.4.dsc new-dir
>   dpkg-source: info: extracting devscripts in new-dir
>   dpkg-source: info: unpacking devscripts_2.16.4.tar.xz
>   $ dpkg-source -x devscripts_2.16.4.dsc new-dir
>   dpkg-source: error: unpack target exists: new-dir
> 
> I'd appreciate if any of you could provide a reproducer for this?

dget doesn't pass dpkg-source an explicit directory to unpack into. On
stable, this leads to:

adam@jacala:/tmp$ mkdir debian-installer-netboot-images-20150422+deb8u4
adam@jacala:/tmp$ cat > debian-installer-netboot-images-20150422+deb8u4/testfile
this is a test
adam@jacala:/tmp$ cat debian-installer-netboot-images-20150422+deb8u4/testfile
this is a test
adam@jacala:/tmp$ dpkg-source -x 
/home/adam/code/debian/debian-installer-netboot-images_20150422+deb8u4.dsc
dpkg-source: info: extracting debian-installer-netboot-images in 
debian-installer-netboot-images-20150422+deb8u4
dpkg-source: info: unpacking 
debian-installer-netboot-images_20150422+deb8u4.tar.xz
adam@jacala:/tmp$ cat debian-installer-netboot-images-20150422+deb8u4/testfile
cat: debian-installer-netboot-images-20150422+deb8u4/testfile: No such file or 
directory

Regards,

Adam

Reply via email to