Created attachment 489268 [details] This patch, which _properly_ fixes the trash-empty command, REPLACES the previous trash-cli-empty_days.patch (It includes the fixes from the previous version.) +++ This bug was initially created as a clone of Bug #675539 +++ An update I provided to my previous report (bug #675539) looks to have been missed, and wasn't included in that update. I apologize for not catching it the first time around. As a result, even with my patch applied the trash-cli 'trash-empty' command can mishandle its optional [days] argument. From the previous bug... -------- In testing the new build, I caught a further issue with trash-empty that I hadn't noticed before. My first patch inadvertently exposes it. If the argument passed to [days] is invalid, trash-empty will output usage information, but then continues right through to perform the deletion as if no argument had been passed. This results, once again, in an overzealous removal of all trash: contents. % trash-list 2011-02-07 06:41:21 <path>/week06b.odp 2011-02-07 06:41:21 <path>/week06b.ppt % trash-empty 0.5 Usage: trash-empty [days] % trash-list % -------- ...I am attaching a replacement patch which fixes this issue in addition to the problem addressed in the previous patch.
Rahul and Frank, This patch has already been applied. Closing as FIXED. Thank you for your patch Frank :) Thanks, Ankur
Ankur, Apologies if I'm in error here, but I'm reopening this... as best I'm able to determine, *this* patch has NOT been applied. A previous version of the patch was applied, but it's missing one critical change (the addition of 'parser.exit()' following 'parser.print_usage()' on line 62 of empty.py). That PREVIOUS (not-entirely-correct) patch was included in trash-cli-0.11.3-0.2.r315.fc14.noarch, which appears to be the latest version pushed out to f14-updates. It was foolish of me, in retrospect, to give both patch files the same filename. (The idea was to indicate that the newer version would replace the other file, but I think it only caused confusion. I apologize for that error. Anyway, the patch file above — trash-cli-empty_days.patch "version 2.0", which is 19 lines long — is newer and more complete than the patch that was applied in building trash-cli-0.11.3-0.2.r315.fc14.noarch If the updated patch has indeed been included in the package sources, then I'd like to request that new packages be built and pushed to the repos, so that users will have the complete fix. Thanks, and apologies again for the confusing situation I created.
(In reply to comment #2) > Ankur, > > Apologies if I'm in error here, but I'm reopening this... as best I'm able to > determine, *this* patch has NOT been applied. > > A previous version of the patch was applied, but it's missing one critical > change (the addition of 'parser.exit()' following 'parser.print_usage()' on > line 62 of empty.py). That PREVIOUS (not-entirely-correct) patch was included > in trash-cli-0.11.3-0.2.r315.fc14.noarch, which appears to be the latest > version pushed out to f14-updates. > > It was foolish of me, in retrospect, to give both patch files the same > filename. (The idea was to indicate that the newer version would replace the > other file, but I think it only caused confusion. I apologize for that error. > > Anyway, the patch file above — trash-cli-empty_days.patch "version 2.0", which > is 19 lines long — is newer and more complete than the patch that was applied > in building trash-cli-0.11.3-0.2.r315.fc14.noarch > > If the updated patch has indeed been included in the package sources, then I'd > like to request that new packages be built and pushed to the repos, so that > users will have the complete fix. > > Thanks, and apologies again for the confusing situation I created. Hi Frank, I just checked up. I had built it with the new patch for f14 too (http://koji.fedoraproject.org/koji/packageinfo?packageID=10024), but I hadn't pushed an update. IIRC, we were waiting to verify the package over rawhide, and then completely forgot about it. The build has been deleted. I'll request a fresh build and push an update over the next few hours. Thank you for bringing this to our notice Ankur
trash-cli-0.11.3-0.4.r315.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/trash-cli-0.11.3-0.4.r315.fc14
Package trash-cli-0.11.3-0.4.r315.fc14: * should fix your issue, * was pushed to the Fedora 14 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing trash-cli-0.11.3-0.4.r315.fc14' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/trash-cli-0.11.3-0.4.r315.fc14 then log in and leave karma (feedback).
Tested and karma'd, everything looks good. Thanks again, Ankur!
Closing this, as the 0.11.3-0.4.r315.fc14 package has reached the updates repo.
For the record, upstream has fixed this in https://code.google.com/p/trash-cli/source/detail?r=317 We should drop these patches when we bump up to the next version
trash-cli-0.11.3-0.4.r315.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.