ucf --purge reaches code where basename doesn't have a parameter

Bug #1537753 reported by shemgp
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
High
Unassigned
ucf (Debian)
Fix Released
Unknown
ucf (Ubuntu)
Fix Released
High
Unassigned
Nominated for Xenial by Alberto Salvia Novella

Bug Description

When I was clearing up unpurged packages, grub-pc was not being purged because of an error "basename: missing operand". Looked at the code and "ucf --purge /etc/default/grub" was bailing out at line 472, which has the code:
    old_mdsum_file="$source_dir/$(basename ${new_file}).md5sum";
Looking at ${new_file} at the code above, sure enough, it wasn't being initialized at purge (line numbers 349 - 374). So I changed the else to test if $new_file was there and I was able to purge grub-pc.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ucf 3.0032 [modified: usr/bin/ucf]
ProcVersionSignature: Ubuntu 4.3.0-6.17-generic 4.3.3
Uname: Linux 4.3.0-6-generic x86_64
ApportVersion: 2.19.3-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jan 25 21:08:03 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-09-28 (118 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
PackageArchitecture: all
SourcePackage: ucf
UpgradeStatus: Upgraded to xenial on 2016-01-06 (18 days ago)

Revision history for this message
shemgp (shemgp) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ucf (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ucf_make-purge-grub-pc-work.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in hundredpapercuts:
status: New → Confirmed
Changed in ucf (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
importance: Undecided → High
Changed in ucf (Ubuntu):
status: Confirmed → Triaged
Changed in hundredpapercuts:
status: Confirmed → Triaged
Revision history for this message
Paul Gevers (paul-climbing) wrote :
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Fixed released as per previous comment.

Changed in ucf (Ubuntu):
status: Triaged → Fix Released
Changed in ucf (Debian):
status: Unknown → Fix Released
Revision history for this message
Paul White (paulw2u) wrote :

Closing as all other bug tasks showing "Fix Released"

Changed in hundredpapercuts:
status: Triaged → Fix Released
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.