Bug 17058

Summary: File::Temp regression
Product: Sisyphus Reporter: Dmitry V. Levin <ldv>
Component: perl-baseAssignee: at <at>
Status: CLOSED WORKSFORME QA Contact: qa-sisyphus
Severity: major    
Priority: P2 CC: at, boyarsh, crux, php-coder, viy
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
restore cwd at the end of script none

Description Dmitry V. Levin 2008-09-08 19:21:12 MSD
In current Sisyphus "srpmcmp --deep" is broken:

[builder@people .in]$ rpmquery perl-base srpmcmp 
perl-base-5.8.8-alt20
srpmcmp-0.2-alt3
[builder@people .in]$ srpmcmp --deep basesystem-sisyphus-alt17.src.rpm{,}
End of diff

cannot fetch initial working directory: No such file or directory at /usr/lib/perl5/File/Temp.pm line 901
Comment 1 Dmitry V. Levin 2008-09-08 20:18:21 MSD
With "basesystem" package, plain srpmcmp doesn't work, too:

[builder@people .in]$ rpmquery perl-base srpmcmp
perl-base-5.8.8-alt21
srpmcmp-0.2-alt3
[builder@people .in]$ srpmcmp basesystem-sisyphus-alt17.src.rpm{,}
End of diff

cannot fetch initial working directory: No such file or directory at /usr/lib/perl5/File/Temp.pm line 901
Comment 2 Dmitry V. Levin 2008-09-08 21:17:22 MSD
with perl-base-5.8.8-alt16 works yet,
with perl-base-5.8.8-alt17 no longer works.

BTW,
$ srpmcmp /foo >/dev/null 
[builder@people .in]$
$ srpmcmp /foo            
usage:
/usr/bin/srpmcmp [--deep] [--autocrap] [--rcs] package1.src.rpm package2.src.rpm
See srpmcmp(1) for details.
Comment 3 Dmitry V. Levin 2008-09-25 18:59:32 MSD
(In reply to comment #2)
> with perl-base-5.8.8-alt16 works yet,
> with perl-base-5.8.8-alt17 no longer works.

perl-base-5.8.8-alt22 still doesn't work.
Comment 4 Dmitry V. Levin 2008-10-07 16:38:02 MSD
(In reply to comment #3)
> (In reply to comment #2)
> > with perl-base-5.8.8-alt16 works yet,
> > with perl-base-5.8.8-alt17 no longer works.
> 
> perl-base-5.8.8-alt22 still doesn't work.

perl-base-5.8.8-alt23 still doesn't work. :(
Comment 5 Dmitry V. Levin 2008-11-01 13:12:31 MSK
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > with perl-base-5.8.8-alt16 works yet,
> > > with perl-base-5.8.8-alt17 no longer works.
> > 
> > perl-base-5.8.8-alt22 still doesn't work.
> 
> perl-base-5.8.8-alt23 still doesn't work. :(

perl-base-5.8.8-alt24 still doesn't work. :((
Comment 6 Slava Semushin 2009-03-29 12:31:33 MSD
(В ответ на комментарий №5)
perl-base-5.8.9-alt1.1: srpmcmp работает, но временные каталоги не удаляются. (см. bug #19387)
Comment 7 Slava Semushin 2009-03-29 12:31:55 MSD
*** Bug 19387 has been marked as a duplicate of this bug. ***
Comment 8 Dmitry V. Levin 2010-11-14 04:13:17 MSK
perl-base-5.12.2-alt00, временные каталоги всё так же не удаляются.
Comment 9 Vladimir Lettiev 2010-11-14 12:36:32 MSK
Created attachment 4657 [details]
restore cwd at the end of script

restore cwd at the end of script
Comment 10 Vladimir Lettiev 2010-11-14 12:39:53 MSK
Сообщение об ошибке стало более адекватным:
cannot remove path when cwd is /tmp/.private/crux/srpmcmp.Zib8UWiHlD for /tmp/.private/crux/srpmcmp.Zib8UWiHlD:  at /usr/share/perl5/File/Temp.pm line 902

Т.о. каталог не удаляется, поскольку текущий каталог процесса находится в удаляемом каталоге.
Думаю надо патчить srpmcmp, чтобы он восстанавливал текущий каталог перед завершением работы
Comment 11 Dmitry V. Levin 2010-11-14 16:19:17 MSK
OK, тогда закрываю.