- const SourcePackage &pkg = dynamic_cast<const SourcePackage &>(*file_tgt.get_package());
- InstalledFile *inst = new InstalledFile(builder, pkg, file_tgt, arg);
+ InstalledFile *inst = new InstalledFile(builder, *file_tgt.get_package(), file_tgt, arg);