Proper way to modify existing files?

Hi! I'm writing a small package for my own purposes to install some keyboard options I want to add to X. I am adding some files to /usr/share/X11/xkb/, but I also need to modify /usr/share/X11/xkb/rules/evdev, /usr/share/X11/xkb/rules/evdev.lst, and possibly /usr/share/X11/xkb/rules/evdev.xml. The modifications are small -- two or three lines generally, but I'm not sure what the best way to make these modifications are.
Based on what I can find on the wiki, I can proceed one of two ways:
* I can create a patch for the files, apply the patch during build() to the source files, and then put them into the package to replace the existing files.
* I can add a .install file, which either applies the patches after install, or uses echo ... >> to add the appropriate lines to the files.
I'm not sure if I'm missing something, or what the best way to apply these changes is? Which of these options is the cleanest to back out of? And how does pacman handle possible interactions with other packages that might want to modify the same files?
I'm tempted towards the second option because if I use the various hooks it might be easier to back out of the changes?
Thanks,
Ricky

Neither of these are sane ideas. If you want to modify files which are owned by a package (any package) and not part of the backup array, you have a few options:
1) rebuild the package owning the files with your changes. you'll have to do this for every release.
2) rebuild the package with those files in the backup array. now you're free to change them and they won't be clobbered on upgrade. But, you'll still need to do this every release.
3) change the files anyways, and add them to NoUpgrade in /etc/pacman.conf
package install scriptlets are not meant to be used to arbitrarily modify files.

Similar Messages

  • Proper way to save FW file for use in print and web?

    I have a high resolution FW file that has a lot of vectors, but includes gradients too.
    It is on a transparent artboard, and I want to preserve the transparency.  I want to be
    able to use it for both print and web projects.   I am assuming that the best way to do
    this is to save it as a PSD file, but when I do that, the appearance of the file changes,
    specifically, the words "web design" in the logo lose some of the boldness and sharpness
    that they had in the FW version.("web design" is vector with a solid fill)  What am I doing wrong?

    2 type of dialogs can appear.
    1 ... Replacing file
    2 ... Internal Error of FW. (other are same two)
    else... you have some problem there.
    Well.. jms1017 can you post the dialog screen here? Thanks!

  • Is there a way to modify the file name when clicking the pdf button to be different

    I wish to have the default name to something like document type_document #.

    Hi,
    Only possible when you export through File--->Export--->PDF. If you directly click PDF icon, system will store with default format.
    Thanks & Regards,
    Nagarajan

  • Proper way to embed PDF into IE6 or 7

    Does anyone know the official proper way to embed these files?
    I have seen it this way
    [code]
    EMBED src="example1.pdf" width="450" height="450" href="example1.pdf"> /EMBED>
    [/code]
    and this way
    [code]
    OBJECT CLASSID="clsid:CA8A9780-280D-11CF-A24D-444553540000" WIDTH=728
    HEIGHT=728>  EMBED SRC="manual.pdf"
    HEIGHT=728 WIDTH=728> NOEMBED> Your browser does not support embedded PDF
    files. /NOEMBED> /EMBED>/OBJECT>
    [/code]
    Any help is appreciated.
    (I had to take out all the less-than signs becase it was trying to run the actual code.)
    thanks,
    -brett

    To send an html email, you must first build a web page (with the contents you need) then send that.
    Keep in mind that a lot of people have disabled the option to get the html so they will see garbage.
    Here is a great resource for html email design...
    http://www.mailchimp.com/resources/html_email_design.pdf

  • How to modify existing code of SQVI report?

    Hi Expert,
       There is a SQVI report which has already been created but we need to change the one for new requirement.
    is there any way to modify existing code for new requirement?
    Can we edit in abap workbench?
    Thanks & Regards
    Savita

    Savita,
    You can not modify SQVI system generated code. You need to go to SAVI change mode and make modifications. If your requirement is a sort of additional fields or inserting come code into the program , then SQVI is not the choice. You need to use Infoset Queries (SQ03, SQ02, Sq01).
    KJogeswaraRao

  • Proper way to make bulk changes the Owner ID, Path and file share credentials for my existing subscriptions, ExtensionSettings

    We are going through with an upgrade/migration to SSRS 2012 and moving everything to a different domain. We have about 200 active subscriptions running, the reports are being delivered to a file share.  What is the correct way, in bulk, to change
    the OwnerId, the Path and the FileShare Username password credentials for these subscriptions?  I see these values are being stored in Subscriptions > ExtensionSettings.  I see that the file share path and Owner wouldn't be a problem to change,
    but since I see the file share credentials are encrypted I would not be able change them directly in ExtensionSettings.  Anyone know the proper way to change the Owner ID, Path and file share credentials for my existing subscriptions without having to
    change each one of them manually in the report manager?
    Note: Reporting Services Native upgrade from SSRS 2005 to SSRS 2012.
    Thanks in advance.

    Hi Cygnus46,
    Based on my understanding, you want to change the Owner ID, Path and file share credentials for all existing subscriptions.
    In Reporting Services, the subscription information are stored in the Report Server database. In your scenario, you can go to report server database and run the query to list all the subscriptions, then modify the owner and fileshare paths in the subscriptions
    table. For more information, please refer to this article: Tip: Change the Owner of SQL Reporting Services Subscription. If you want to change
    the file share credentials for subscriptions, you can run the query provided by
    wiperzeus from this similar thread:
    Windows File Share Delivery/ SSRS 2008 R2.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • I can't find a way to direct a file download to a folder as in Chrome or Firefox.  Surely there must exist a way to do this.

    I can't find a way to direct a file to download to a specific folder in Safari.  Does that not exist?

    Hi there!
    Itunes is an app only for Mac/PC, used to sync iPad to the computer and to listen to music.
    You can listen to music on the iPad using the Music app.
    To enable syncing/backup of your data without a computer, use iCloud.
    Thank you for using Apple Support Communities.
    All the very best,
    James

  • Modifying existing jar file, how?

    Hi there,
    I have a problem trying to modify an existing jar file. When I want to create a jar file, I use something like:
    REM build the application on windows, assuming the java/bin
    REM directory is in the path environment variable
    REM application is just the directory I am using
    SET cp = c:\application\TestApp
    javac -classpath %cp% TestApp.java
    REM ****************************************
    REM do packaging and adding manifest
    REM ****************************************
    jar cvfm App.jar manifest.mf TestApp*.class
    REM ****************************************
    REM run the jar file
    REM ****************************************
    javaw -jar App.jar
    But now, I have an existing jar file (swingall.jar) and I want to modify a class within that file. So, I modified the .java file, and compiled it to get my new class file.
    And the question is, how do I modify the existing file, so that I keep everything the same, except the modified class?
    Thanks
    Fernando

    I have just found out that I can't use "u". It seemsthat's only
    possible with older versions of jar.Huh? I'm using the 1.4.2-b28 jdk, it's still there,
    and I don't see how it could ever possibly be
    removed.
    Type:
    jar
    with no arguments to see all the options to jar.I already did, to double check it, and this is what I got:
    C:\Documents and Settings\Fernando Sanz>jar
    Usage: jar {ctx}[vfm0M] [jar-file] [manifest-file] files ...
    Options:
    -c create new archive
    -t list table of contents for archive
    -x extract named (or all) files from archive
    -v generate verbose output on standard error
    -f specify archive file name
    -m include manifest information from specified manifest file
    -0 store only; use no ZIP compression
    -M Do not create a manifest file for the entries
    If any file is a directory then it is processed recursively.
    The manifest file name and the archive file name needs to be specified
    in the same order the 'm' and 'f' flags are specified.
    Example: to archive two class files into an archive called classes.jar:
    jar cvf classes.jar Foo.class Bar.class
    Note: use the '0' option to create a jar file that can be put in your CLASSPATH
    Thanks for trying with jdk 1.4, I don't have it installed in my computer right now, so I'll try tomorrow with another computer at Uni.
    Thanks!

  • Is this a proper way to check if a string exist in a db-column?

    I don't know I am posting this in the right forum... anyway... I am trying to check if a string as an email address exist in a database with jsp (by returning true if the string exist). I have managed to do it but I am not sure if this is the best way.
    As you see I have used stmt.executeQuery( "SELECT myDbColumn FROM myTable where myDbColumn=myInputStr" ) and checked by if rs.next() returning false or true. Here is my code in short format:
    boolean strExist = false;
    String myInputStr = request.getParameter("inputStr");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery( "SELECT myDbColumn FROM myTable where myDbColumn=myInputStr" );
       if(rs.next())
          strExist = true;
       else
          strExist = false;
        return strExist;Is this the proper way of checking if a string exist in a db-column???
    Thanks

    I responded to your first thread [here.|http://forums.sun.com/thread.jspa?threadID=5374902]

  • Is there a proper way to name files?

    I know that folders can have spaces in the name, but what about actual file names themselves? Is it OK to name our files with a space or should we just use a "_" to be safe? What could go wrong if we use a space in the file name? What other characters should we avoid in file names?
    Thanks!

    The article I refer to was somewhat vague to me and I guess my first statement of "adopting a new standard" is incorrect/misleading as I believe it was an adoption of the rest/more of the current standard as opposed to an all adopting an "all new" standard. Standards don't need to be followed 100% for something to be "compliant". This is an area that is gray to me as I understand it is also some sort of proprietary Apple code. The trade names and underscore situation I have discovered on my own.
    I am quite certain I have a copy somewhere on an external HD but I am waiting for my third power-cord for my G4. I gave up on replacing battery connectors and now it heats the cables until the insulation melts away shorting it out. I will not connect externals to the MBP as they don't work properly and must be repaired when I try to use them in 3.9. I have already lost one HD and can't afford to lose another at the moment. Unfortunately if it doesn't arrive today or tomorrow I will not be able to post it as my .Mac trial is about up and I have no use for it to warrant purchasing a full account.
    None of these files have been named pre OS X and all of these HD's, folders, files and my file naming convention I have used since 10.0. OS X.4 and Quick time have tightened their adherence, and not necessarily changed, to different standards, ISO, IEEE, MPEG, ASCII etc. One that I believe to be a major problem in 10.4 is with the ISO time-codes as equipment and apps alike do not convert or correct the "normal errors" properly.
    I'm quite certain even this problem is caused in this "I/O Kit" as at least two separate OS architectures come together here possibly 3 (I am clueless how/if classic fits into the picture here). Then it's supposed to run on three different processors w/ various supported and "unsupported" HW configurations. Quite an incredible accomplishment IMO. Something was bound to be overlooked/misplaced/added/deleted especially when one looks at the speed at which all this conversion took place. I just wish that kernel panics made others as nervous as I and would cause one to report them to Apple. The amount of HW destroyed on my PB G4 running 10.4 and a MBP that wants to act like a PPC is enough for me to be convinced me that the situation is very serious.
    Here's what others experience as well, in this situation I believe it is the extensions creating the problem. Unfortunately I read hundreds of pages a day as my MBP is useless for what I bought it for (iMovie) and I have nothing to do but to try and fix it. A lot of the self proclaimed experts on the various Apple boards believe that OS X.4 and a MBP are supposed to be slow and sluggish and that the problems that abound are "normal" or acceptable. IMO the iMovie board in particular is full of outdated or misinformation.
    http://discussions.apple.com/message.jspa?messageID=3742429#3742429
    I believe I may have stumbled across it from this email or in another Apple link if not a Developer Reference Manual. Adobe has issues with characters at the moment as well. I have thousands of files that can't be browsed in the PS browser as certain file names are shutting it down. No report being produced anywhere so I can't narrow it down. These files and folders were all named and organized in PS and I have used them, cross platform, for years without a problem. The only way to access these folders/files are by booting into 10.3.9 or less on my G4.
    http://docs.info.apple.com/article.html?artnum=301984
    http://docs.info.apple.com/article.html?artnum=302231
    Hello from Apple!
    Christopher at Apple Service & Support thought that you might find this article useful. We hope that it helps resolve your technical issue.
    Link: http://www.info.apple.com/kbnum/n106272
    You can't empty the Trash or move a file to the Trash in Mac OS X
    In Mac OS X, each user account has a separate, invisible Trash folder that is in the home folder. When you view contents of the Trash, you see only items you placed there and not the Trash folder of any other accounts. If other writable volumes are present, you may also have individual Trash folders on these volumes.
    How to delete a file
    Drag an item's icon to the Trash (in the Dock), or select the item and press Command-Delete.
    Choose Empty Trash from the Finder menu.
    Tip: If you're trying to delete a file that wasn't completely downloaded or copied, check out this document.
    Tip: In Mac OS X 10.3 Panther or later, you can securely delete items by choosing Secure Empty Trash from the Finder menu.
    If you change your mind about deleting the item before you choose Empty Trash:
    Click the Trash icon in the dock.
    Drag the item out of the Trash.
    If you can't empty the Trash or move a file to the Trash
    For example, this message might appear when you try to empty the Trash: "The operation could not be completed because the item '(item name)' is locked."
    First, try holding the Option key as you choose Empty Trash from the Finder's File menu.
    Otherwise, you can check for these conditions:
    Is the file locked?
    If files are locked, unlock them before deleting or delete using the tips in the "Deleting locked files" section below. Also, see Mac OS X: Unable to Move, Unlock, Modify, or Copy an Item .
    Do you have correct permissions to modify the file?
    Every file and folder in Mac OS X has some permission settings to help define what you or other users can do with the file or folder, for example whether you may modify it or not. If see an alert box with a message that says you do not have "sufficient" privilege or permission, see the tips in the "Emptying the Trash" section of "Mac OS X: Troubleshooting Permissions Issues".
    Does the file or volume have special characters?
    Usually, Mac OS X can delete files whose names contain special characters, but sometimes you might need to follow this advice.
    Note the name of the volume which the files are being deleted from. If you are not sure of the item's location, you can verify that by selecting it then choosing Show Info from the File menu. If the name of the volume contains any special ASCII characters, such as a bullet or trademark character, temporarily rename the volume so that it does not contain these characters.
    Example: If you cannot delete files from a volume named "·Dox", rename the volume to "Dox". After the Trash is empty, restore the volume's original name as desired.
    Examine the name of the files or folders you cannot delete. They should not contain a solidus ("slash", "/") character or any other special ASCII character such as a trademark, quotation mark, or copyright symbol. If the file does, remove the special character or slash from its name, then delete it.
    Example: If you cannot delete a file named "Things/Stuff·", rename the file to just "t", then delete it.
    Deleting locked files
    Locked files can easily be deleted if you press Shift-Option or Option key combination while emptying the Trash (in Mac OS X 10.1 and later). For Mac OS X versions 10.0 to 10.0.4, use Show Info to deselect the item's Locked checkbox.
    If you still cannot delete the item, start up your computer from the Mac OS X CD-ROM and choose Disk Utility from the Installer menu of the first screen. Use Disk Utility to verify and, if necessary, repair your disk.
    Tip: When started up from CD, do not click Continue. Disk Utility is only available in the first screen. If you click Continue, restart the computer from the CD.
    If a file can't be unlocked, you may not have permission to unlock it. See "Mac OS X: Troubleshooting Permissions Issues" to learn how to get write permissions.
    If the issue persists, use Disk Utility's Repair Permissions feature to check your Mac OS X volume. For Mac OS X 10.1.5 only, download and use Repair Privileges Utility 1.1 instead.
    Advanced tip about deleting locked files
    If there are several locked files in the Trash, you can unlock them all at the same time at the command line. Follow these steps:
    Open Terminal. It's located in /Applications/Utilities.
    Type: chflags -R nouchg
    Note: Type one space (not pictured) after nouchg in the line above, so that it ends in "nouchg ". Do not press Return yet.
    Double-click the Trash icon in the Dock to reveal the contents of the Trash. If necessary, arrange the Finder window so that a portion of the Terminal window is still visible.
    Press the Command-A key combination to select all files in the Trash.
    Drag the files from the Trash to the Terminal window.
    Note: This automatically enters the pathname for each file. This eliminates the need to individually empty multiple Trash directories, particularly when multiple disks or volumes are present.
    Press Return. No special text message will be shown indicating that the command was successful.
    Empty the Trash.
    If the Trash does not empty or if you see a message in Terminal that says "usage: chflags [-R [-H | -L | -P]] flags file..." you most likely did not type the text in step 2 as indicated or did not leave a space. Repeat the steps if this happens.
    Related documents
    106237 Mac OS X: Unable to Move, Unlock, Modify, or Copy an Item
    106712 Troubleshooting permissions issues in Mac OS X
    Thank you,
    Apple
    FWIW

  • Copying a new .class file for WLS to use, proper way?

    Hello. I'm doing some servlet development and I would like to know what is
    the proper way to deploy any .class files and servlets (also .class files)?
    If I just copy them into the proper directory, am I supposed to have to
    restart the server? Is that normal, or should WLS just pick up the new one?
    It does that with JSPs, can it do that with servlets and supporting classes?
    Thanks.

    I found out that I was copying the wrong file to the right place (.java
    instead of the .class :<). So once I fixed that small little :> problem, I
    was off and running. Thank you for your help! :>
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]..
    Hi Peter,
    Normally weblogic will redeploy automatically application, either web
    or ejb, without restarting the server, when it's copied to applications
    directory on the server. Applications should be properly packaged.Servlets
    and supported files should be in war file, ejb-s in ejb-jar files.
    I'm not sure if it would work right for plain unpacked class files.
    Regards,
    Slava Imeshev
    "PeterH" <!REMOVEBeforeSending! > wrote in message
    news:[email protected]..
    Hello. I'm doing some servlet development and I would like to know whatis
    the proper way to deploy any .class files and servlets (also .classfiles)?
    If I just copy them into the proper directory, am I supposed to have to
    restart the server? Is that normal, or should WLS just pick up the newone?
    It does that with JSPs, can it do that with servlets and supportingclasses?
    Thanks.

  • ASAP Is any Java libraries exist to modify Excel file and PDF file

    Is any Java libraries exist to modify Excel file and PDF file. I know about the third party libraries like Apache poi and many more. But I want to know about java libraries not the third party tools.

    Souvik_Software wrote:
    I don't know what you guys want. I simply asked for a answer and because me want it urgently that is why I have written "ASAP". But I think you are more energetic in fighting not with the answer. Thanks for the help.By flagging it with words as "ASAP" and "Urgent" your are implying that your question is more important than other people's questions or that your time is more valuable than the time of people answering questions here. So you see, by doing so, you sound rather selfish.
    But, the answer to the question in your original post is: "no, there are no classes in the core Java API that do what you want". Simple.

  • Is there a way to keep Deployment Utility from modifying sequence file paths?

    While the Deployment Utility appears to be a great tool, it does some things that I'd rather it didn't. One is that it modifies all paths in sequence that it is including from Absolute to Relative. While this is a nice feature for many reasons, it is a show-stopper for our uses. This is because as part of our distribution process, we also use a checksum routine to verify that the sequence files being run by the operators on the Test Stations we deploy to are running the correct (unmodified) version of the test software. By using Absolute paths, we can detect and prevent accidental editing/changing of the sequences or paths that we have deployed, but if we have to use relative paths that is something that we could work with also.
    So my questions are: 1. Can this path update 'feature' be disabled? and 2. If not, then will pre-setting all paths in a sequence cause the deployment utility to only copy the file and not update it (thus changing it's checksum)?
    I'm going to test the latter when I have time, and if there are any other suggestions that might be useful, I'm love to hear them.
    Thanks,
    -Jack 

    Rick,
    In my experimentation to see if using relative paths, I was able to prove that a sequence that uses them will not be updated - with one caveat; if the path that is referenced by the sequence is not itself in a sub-directory, i.e.; it's in a different branch of the relative directory structure with respect to the Target (such as the TestStand directory), then the sequence file is always updated and re-saved. An example is that we have a sequence in the Tools directory that calls a DLL in the FrontEnd directory of the Components\User path. This re-saving causes a checksum change and screws up our verification mechanism. 
    It is unfortunate that I cannot prevent the deployment utility from modifying sequence files - Since we control the entire Test environment, including the location that software gets installed to - Test Station custodians can't go installing the software in a different location, or worse, multiple locations, so we don't have the issue to worry about.
    Because of this 'better' method, we now have to re-evaluate how to control the installed version of the software, or use a different installer, such as CVI, which while it has been working for us, has it 's own issues that we're trying to get away from. I'm glad that I am finding out about this now before I've locked down the sequences so that I can probably move the features in the Tools to the Frontend Callback sequence. 
    It's almost always the case thought that one persons forced enhancement is another's 'feature' or worse 'bug'.
    Thanks for confirming the behavior on the Deployment utility for me.
    -Jack

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • Modify existing data using LSMW IDoc method

    Hi experts,
    I am trying to transfer activity data from R/3 system to CRM using Idoc LSMW method.
    It working fine that LSMW creates new activities in CRM system, & there is a check in the conversion code that if the activity we are trying to transfer exists in CRM system it will skip that transaction.
    Now the requirement is that we don't want to skip, if the activity is already present in CRM system than it should modify the existing.
    IDOC used :                       CRMXIF_ORDER_SAVE_M02
    Msg type used:                 CRMXIF_ORDER_SAVE
    Note:
    LSMW will not create activities in the system; SXDA data transfer workbench will be used to process the data in CRM system. SXDA project has following two steps:
    -     Merge files u2013 This step uses a custom function module to merge one or more than one files and creates a file which is   required for LSMW.
    -     Convert the data u2013 This step uses LSMW as the conversion method
    -     Load the data u2013 This step uses the IDoc object interface
    Now the doubt is that if i remove the check than it will create an another activity with same activity no. or modify the existing one, or is there another way to modify the existing activity in CRM system?
    Waiting for a qiuck response.
    Thanks
    d_marco

    HI,
    Thanks for your quick valuable response.
    I have a doubt, we are transferring activities from R/3 system to CRM system, & these activities are maintained in R/3 application system in the form of text files
    Now the question is if the text file contains 10 activities( transactions) with there header, partner & item details & from these 10 activities some are new & some are already present in CRM system, than will it be possible to create the new ones & update the existing ones withe single LSMW project run.
    I think that we can put a check in the conversion code where transaction begins that if the particular activity( transaction) already present in CRM system than set a flag as "U" to update, if activities are new than set it as "I"  to insert & than pass this flag in  the conversion rule to the field "OBJECT_TASK" of IDOC  structure
    or
    we need to maintain text files as for update or insert separately but not for mixed task of update/insert.
    Will this update/insert process also work's if we are using a copy of standard IDOC type with some custom segments & custom fields.
    Thanks
    d_marco

Maybe you are looking for